package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.SocPlanDispatchDTO;
import org.jsola.hr.dto.SocPlanDispatchUserAddDTO;
import org.jsola.hr.dto.SocPlanDispatchUserUpdateDTO;
import org.jsola.hr.query.SocPlanDispatchUserQuery;
import org.jsola.hr.vo.EmpSocPlanListVO;
import org.jsola.hr.vo.SocPlanDispatchUserListVO;
import org.jsola.hr.vo.SocPlanDispatchUserVO;
import org.jsola.hr.vo.TaskOrderUserCountVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * 增减员计划派单人员表
 *
 * @author zhr
 */
@Api(tags = "hr-增减员计划派单人员表")
public interface ISocPlanDispatchUserControllerAPI {

    /**
     * 新增增减员计划派单人员表
     *
     * @param socPlanDispatchUserAddDTO 增减员计划派单人员表新增实体
     * @return 增减员计划派单人员表展示对象
     */
    @ApiOperation(value = "新增增减员计划派单人员表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserAddDTO", dataType = "SocPlanDispatchUserAddDTO", value = "新增增减员计划派单人员表", paramType = "body")
    })
    Result<SocPlanDispatchUserVO> save(SocPlanDispatchUserAddDTO socPlanDispatchUserAddDTO);


    /**
     * 修改增减员计划派单人员表
     *
     * @param socPlanDispatchUserUpdateDTO 增减员计划派单人员表
     * @return 更新数量
     */
    @ApiOperation(value = "修改增减员计划派单人员表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserUpdateDTO", dataType = "SocPlanDispatchUserUpdateDTO", value = "修改增减员计划派单人员表", paramType = "body")
    })
    Result<Integer> update(SocPlanDispatchUserUpdateDTO socPlanDispatchUserUpdateDTO);


    /**
     * 删除单个增减员计划派单人员表，彻底删除
     *
     * @param socPlanDispatchUserId 增减员计划派单人员表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个增减员计划派单人员表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserId", dataType = "String", value = "增减员计划派单人员表id", paramType = "path")
    })
    Result<Integer> delete(String socPlanDispatchUserId);


    /**
     * 批量删除增减员计划派单人员表，彻底删除
     *
     * @param socPlanDispatchUserIds 增减员计划派单人员表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除增减员计划派单人员表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserIds", dataType = "String[]", value = "增减员计划派单人员表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] socPlanDispatchUserIds);


    /**
     * 根据增减员计划派单人员表id查询增减员计划派单人员表详情
     *
     * @param socPlanDispatchUserId 增减员计划派单人员表id
     * @return 增减员计划派单人员表详情
     */
    @ApiOperation(value = "根据增减员计划派单人员表id查询增减员计划派单人员表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserId", dataType = "String", value = "增减员计划派单人员表id", paramType = "path")
    })
    Result<SocPlanDispatchUserVO> findById(String socPlanDispatchUserId);


    /**
     * 查询增减员计划派单人员表
     *
     * @param socPlanDispatchUserQuery 增减员计划派单人员表查询参数
     * @return page
     */
    @ApiOperation(value = "查询增减员计划派单人员表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserQuery", dataType = "SocPlanDispatchUserQuery", value = "增减员计划派单人员表查询参数", paramType = "query")
    })
    Result<List<SocPlanDispatchUserListVO>> listAll(SocPlanDispatchUserQuery socPlanDispatchUserQuery);


    /**
     * 分页查询增减员计划派单人员表
     *
     * @param socPlanDispatchUserQuery 增减员计划派单人员表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询增减员计划派单人员表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchUserQuery", dataType = "SocPlanDispatchUserQuery", value = "增减员计划派单人员表查询参数", paramType = "query")
    })
    Result<Page<SocPlanDispatchUserListVO>> page(SocPlanDispatchUserQuery socPlanDispatchUserQuery);

    /**
     * 增减员计划派单
     *
     * @param socPlanDispatchDTO 派单参数
     * @return 派单结果
     */
    @ApiOperation(value = "分页查询增减员计划派单人员表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socPlanDispatchDTO", dataType = "SocPlanDispatchDTO", value = "派单参数", paramType = "body")
    })
    Result<String> dispatch(SocPlanDispatchDTO socPlanDispatchDTO);

    /**
     * 首页查询对应登陆用户的接单列表
     *
     * @param query 查询条件
     * @return 增减员计划
     */
    @ApiOperation(value = "首页查询对应登陆用户的接单列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "query", dataType = "SocPlanDispatchUserQuery", value = "查询参数", paramType = "query")
    })
    Result<Page<EmpSocPlanListVO>> taskOrderUser(SocPlanDispatchUserQuery query);

    /**
     * 接单顶部统计
     *
     * @param query 查询条件
     * @return 统计结果
     */
    @ApiOperation(value = "接单顶部统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "query", dataType = "SocPlanDispatchUserQuery", value = "查询参数", paramType = "query")
    })
    Result<TaskOrderUserCountVO> taskOrderUserCount(SocPlanDispatchUserQuery query);
}

